package com.rtx.edi.platform.structure.service;

import java.util.List;
import java.util.Map;

import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.web.multipart.MultipartFile;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.rtx.edi.model.api.dto.PlApiMappingDTO;
import com.rtx.edi.model.api.dto.PlApiMappingStructureDTO;
import com.rtx.edi.model.api.po.PlApiMappingStructure;

public interface PlApiMappingStructureService extends IService<PlApiMappingStructure> {

	
	/**
	 * 	获取对接场景明细
	 * @return
	 */
	Map<String,Object> selectPlApiMappingStructureDetail(PlApiMappingStructureDTO dto);
	
	/**
	 * 下载对接场景明细 报文映射配置
	 * @param dto
	 * @return
	 */
	XSSFWorkbook downLoadExcel(PlApiMappingStructureDTO dto);
	
	/**
	 * 上传excel
	 * @param multipartFile
	 */
	void uploadExcel(MultipartFile multipartFile);
	
	/**
	 * 	根据目标api_id以及源api_id 获取映射信息
	 * @param dto
	 * @return
	 */
	Map<String,Object> selectApi(PlApiMappingDTO dto);
	
	/**
	 * 	获取场景id下的目标报文结构
	 * @return
	 */
	List<PlApiMappingStructure> queryStructureByMappingId(PlApiMappingStructureDTO dto);
	
	/**
	 * 	新增报文结构节点
	 * @param dto
	 */
	void addStructure(PlApiMappingStructureDTO dto);
	
	/**
	    * 删除目标API报文结构以及子节点 
	 */
	void delStructureNodeAndChild(PlApiMappingStructureDTO dto);
	
	/**
	 * 	更新
	 * @param dto
	 */
	void editStructure(PlApiMappingStructureDTO dto);
	
	/**
	 * 
	 * @param pageParam
	 * @param PlApiMapping
	 */
	void selectStructurePage(Page<PlApiMappingStructure> pageParam, PlApiMappingStructureDTO PlApiMapping);
	
	/**
	 * 获取源字段配置下拉框值
	 * @param dto
	 * @return
	 */
	List<Map<String,String>> querySourceField(PlApiMappingDTO dto);
	
	/**
	 * 删除对接场景下所有配置
	 * @param dto
	 */
	void deleteApiMappingStructureByMappingid(PlApiMappingDTO dto);
}
